package root;
import javax.swing.*;

public class SpringB extends javax.swing.JFrame {
    
    public SpringB() {
        initComponents();
    }

    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        newMemberCprNr = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        newMemberFirstName = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        newMemberAdresse = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        newMemberPhoneNumber = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        newMemberEmail = new javax.swing.JTextField();
        newMemberLastName = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        opretMedlem = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        searchMedlemmer = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tableMedlemmer = new javax.swing.JTable();
        rediger = new javax.swing.JButton();
        fjern = new javax.swing.JButton();
        Gem = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        tilføjTilHold = new javax.swing.JToggleButton();
        searchMedlemmer2 = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        tabelMedlemmer = new javax.swing.JTable();
        jPanel8 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        jLabel11 = new javax.swing.JLabel();
        tilføjIdrætsgren = new javax.swing.JComboBox();
        tilføjAldersgruppe = new javax.swing.JComboBox();
        tilføjTræningsResultat = new javax.swing.JButton();
        udtagKonkurrencehold = new javax.swing.JButton();
        fjernFraHold = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        alleMedlemmer = new javax.swing.JButton();
        betalteMedlemmer = new javax.swing.JButton();
        ikkeBetalteMedlemmer = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();
        gem = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        medlemTotal = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        exit = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jTabbedPane1.setMinimumSize(new java.awt.Dimension(200, 200));
        jTabbedPane1.setName("Springboard"); // NOI18N

        jPanel1.setPreferredSize(new java.awt.Dimension(851, 635));

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Opret / Rediger Medlem"));

        jLabel7.setText("Format: (DDMMYY-NNNN)");

        jLabel1.setText("Cpr.nummer:");

        newMemberCprNr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newMemberCprNrActionPerformed(evt);
            }
        });

        jLabel2.setText("Fornavn:");

        newMemberFirstName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newMemberFirstNameActionPerformed(evt);
            }
        });

        jLabel3.setText("Adresse:");

        jLabel4.setText("Telefon:");

        newMemberPhoneNumber.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newMemberPhoneNumberActionPerformed(evt);
            }
        });

        jLabel5.setText("Email:");

        newMemberLastName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newMemberLastNameActionPerformed(evt);
            }
        });

        jLabel8.setText("Efternavn:");

        opretMedlem.setText("Opret Medlem");
        opretMedlem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                opretMedlemActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addGap(35, 35, 35))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3)
                            .addComponent(jLabel2)
                            .addComponent(jLabel8)
                            .addComponent(jLabel1))
                        .addGap(20, 20, 20)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(newMemberEmail, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(newMemberAdresse, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(newMemberPhoneNumber, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(newMemberFirstName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(newMemberLastName, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(newMemberCprNr, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(opretMedlem, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE))
                        .addGap(21, 21, 21))))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7)
                .addGap(7, 7, 7)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newMemberCprNr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newMemberFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newMemberLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newMemberAdresse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newMemberPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(newMemberEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addGap(18, 18, 18)
                .addComponent(opretMedlem)
                .addContainerGap(124, Short.MAX_VALUE))
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Medlemmer"));

        searchMedlemmer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchMedlemmerActionPerformed(evt);
            }
        });
        searchMedlemmer.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                searchMedlemmerKeyReleased(evt);
            }
        });

        jLabel6.setText("Søg:");

        tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer.getText()),Main.mh.medlemsTitler()));
        jScrollPane4.setViewportView(tableMedlemmer);

        rediger.setText("Rediger");
        rediger.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                redigerActionPerformed(evt);
            }
        });

        fjern.setText("Fjern");
        fjern.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fjernActionPerformed(evt);
            }
        });

        Gem.setText("Gem");
        Gem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GemActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 545, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(18, 18, 18)
                        .addComponent(searchMedlemmer, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(Gem, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rediger)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(fjern, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(searchMedlemmer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rediger)
                    .addComponent(fjern)
                    .addComponent(Gem))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(20, 20, 20)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jTabbedPane1.addTab("Medlem", jPanel1);

        jPanel2.setLayout(null);

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Medlemmer"));

        tilføjTilHold.setText("Tlføj til Hold");
        tilføjTilHold.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tilføjTilHoldActionPerformed(evt);
            }
        });

        searchMedlemmer2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchMedlemmer2ActionPerformed(evt);
            }
        });
        searchMedlemmer2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                searchMedlemmer2KeyReleased(evt);
            }
        });

        jLabel9.setText("Søg:");

        tabelMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer2.getText()),Main.mh.medlemsTitler()));
        jScrollPane5.setViewportView(tabelMedlemmer);
        tabelMedlemmer.getColumnModel().getColumn(0).setResizable(false);
        tabelMedlemmer.getColumnModel().getColumn(1).setResizable(false);
        tabelMedlemmer.getColumnModel().getColumn(2).setResizable(false);
        tabelMedlemmer.getColumnModel().getColumn(3).setResizable(false);
        tabelMedlemmer.getColumnModel().getColumn(4).setResizable(false);
        tabelMedlemmer.getColumnModel().getColumn(5).setResizable(false);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel9)
                .addGap(24, 24, 24)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(tilføjTilHold, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(searchMedlemmer2, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 85, Short.MAX_VALUE)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 656, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(searchMedlemmer2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tilføjTilHold))
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2.add(jPanel7);
        jPanel7.setBounds(18, 271, 995, 143);

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Hold"));

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Cpr.", "Fornavn", "Efternavn", "Alder", "Bedste Træningsresultat"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(jTable3);
        jTable3.getColumnModel().getColumn(0).setResizable(false);
        jTable3.getColumnModel().getColumn(0).setPreferredWidth(5);
        jTable3.getColumnModel().getColumn(1).setResizable(false);
        jTable3.getColumnModel().getColumn(1).setPreferredWidth(6);
        jTable3.getColumnModel().getColumn(2).setResizable(false);
        jTable3.getColumnModel().getColumn(3).setResizable(false);
        jTable3.getColumnModel().getColumn(3).setPreferredWidth(2);
        jTable3.getColumnModel().getColumn(4).setResizable(false);

        jLabel11.setText("Vælg Hold :");

        tilføjIdrætsgren.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SpringRytme", "Grandprix", "Springgymnastik", "Rytme", "Motion og Fitness" }));

        tilføjAldersgruppe.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Puslinge", "Bøllespirer", "Tumlinge", "Mikro", "Ynglinge", "Junior", "Senior", "Veteran" }));

        tilføjTræningsResultat.setText("Tilføj Træningsresultat");
        tilføjTræningsResultat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tilføjTræningsResultatActionPerformed(evt);
            }
        });

        udtagKonkurrencehold.setText("Udtag Konkurrencehold");

        fjernFraHold.setText("Fjern fra hold");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addGap(58, 58, 58)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 161, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(udtagKonkurrencehold, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)
                        .addComponent(tilføjTræningsResultat, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)
                        .addComponent(tilføjAldersgruppe, javax.swing.GroupLayout.Alignment.LEADING, 0, 216, Short.MAX_VALUE)
                        .addComponent(tilføjIdrætsgren, javax.swing.GroupLayout.Alignment.LEADING, 0, 216, Short.MAX_VALUE)
                        .addComponent(fjernFraHold, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)))
                .addGap(55, 55, 55)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 656, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(48, 48, 48))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tilføjIdrætsgren, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(15, 15, 15)
                        .addComponent(tilføjAldersgruppe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(tilføjTræningsResultat)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(udtagKonkurrencehold)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(fjernFraHold))
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel2.add(jPanel8);
        jPanel8.setBounds(18, 11, 1045, 249);

        jTabbedPane1.addTab("Hold", jPanel2);

        jPanel3.setLayout(null);

        alleMedlemmer.setText("Alle medlemmer");
        alleMedlemmer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                alleMedlemmerActionPerformed(evt);
            }
        });
        jPanel3.add(alleMedlemmer);
        alleMedlemmer.setBounds(838, 43, 123, 23);

        betalteMedlemmer.setText("Betalt medlem");
        betalteMedlemmer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                betalteMedlemmerActionPerformed(evt);
            }
        });
        jPanel3.add(betalteMedlemmer);
        betalteMedlemmer.setBounds(838, 84, 123, 23);

        ikkeBetalteMedlemmer.setText("Ikke betalt medlem");
        jPanel3.add(ikkeBetalteMedlemmer);
        ikkeBetalteMedlemmer.setBounds(838, 125, 123, 23);

        jTable4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTable4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null}
            },
            new String [] {
                "Cpr.Nummer", "Fornavn", "Efternavn", "Adresse", "Telefon", "Email", "1.Kvartal", "2.Kvartal", "3.Kvartal", "4.Kvartal"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, true, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane6.setViewportView(jTable4);
        jTable4.getColumnModel().getColumn(0).setResizable(false);
        jTable4.getColumnModel().getColumn(1).setResizable(false);
        jTable4.getColumnModel().getColumn(2).setResizable(false);
        jTable4.getColumnModel().getColumn(3).setResizable(false);
        jTable4.getColumnModel().getColumn(4).setResizable(false);
        jTable4.getColumnModel().getColumn(5).setResizable(false);
        jTable4.getColumnModel().getColumn(6).setPreferredWidth(55);
        jTable4.getColumnModel().getColumn(7).setPreferredWidth(55);
        jTable4.getColumnModel().getColumn(8).setPreferredWidth(55);
        jTable4.getColumnModel().getColumn(9).setPreferredWidth(55);

        jPanel3.add(jScrollPane6);
        jScrollPane6.setBounds(31, 20, 763, 383);

        gem.setText("Gem");
        jPanel3.add(gem);
        gem.setBounds(838, 166, 123, 23);

        jTabbedPane1.addTab("Kontingent", jPanel3);

        jPanel4.setLayout(null);

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Antal medlemmer"));

        jLabel12.setText("I alt:");

        jLabel13.setText("SpringRytme:");

        jLabel14.setText("Grandprix:");

        jLabel15.setText("Springgymnastik:");

        jLabel16.setText("Rytme:");

        jLabel17.setText("MotionFitness:");

        medlemTotal.setText("Antal medlemmer");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(116, 116, 116)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel17)
                    .addComponent(jLabel13)
                    .addComponent(jLabel12)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15)
                    .addComponent(jLabel16))
                .addGap(18, 18, 18)
                .addComponent(medlemTotal)
                .addContainerGap(160, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(medlemTotal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel17)
                .addContainerGap(87, Short.MAX_VALUE))
        );

        jPanel4.add(jPanel10);
        jPanel10.setBounds(44, 210, 470, 240);

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Diverse info"));

        jLabel18.setText("Kontigent betalt:");

        jLabel19.setText("Kontingent ikke betalt:");

        jLabel20.setText("Tid til næste turnering:");

        jLabel21.setText("Version:");

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(80, 80, 80)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel19)
                    .addComponent(jLabel21)
                    .addComponent(jLabel20)
                    .addComponent(jLabel18))
                .addContainerGap(278, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel19)
                .addGap(16, 16, 16)
                .addComponent(jLabel20)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel21)
                .addContainerGap(108, Short.MAX_VALUE))
        );

        jPanel4.add(jPanel11);
        jPanel11.setBounds(530, 210, 480, 240);

        jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gfx/rohlogo_whitebg.png"))); // NOI18N
        jLabel10.setText("jLabel10");
        jPanel4.add(jLabel10);
        jLabel10.setBounds(10, 40, 990, 140);

        jTabbedPane1.addTab("Info", jPanel4);

        exit.setText("Exit");
        exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1081, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(exit, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(59, 59, 59))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 489, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(exit)
                .addGap(21, 21, 21))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void alleMedlemmerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_alleMedlemmerActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_alleMedlemmerActionPerformed

private void betalteMedlemmerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_betalteMedlemmerActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_betalteMedlemmerActionPerformed

private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed
    System.exit(0);
}//GEN-LAST:event_exitActionPerformed

private void newMemberPhoneNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newMemberPhoneNumberActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_newMemberPhoneNumberActionPerformed

private void newMemberFirstNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newMemberFirstNameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_newMemberFirstNameActionPerformed

private void newMemberCprNrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newMemberCprNrActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_newMemberCprNrActionPerformed

    private void newMemberLastNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newMemberLastNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_newMemberLastNameActionPerformed

    private void tilføjTilHoldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tilføjTilHoldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tilføjTilHoldActionPerformed

    private void searchMedlemmer2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchMedlemmer2ActionPerformed
        tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer2.getText()),Main.mh.medlemsTitler()));    
    }//GEN-LAST:event_searchMedlemmer2ActionPerformed

    private void searchMedlemmerKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchMedlemmerKeyReleased
        tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer.getText()),Main.mh.medlemsTitler()));
    }//GEN-LAST:event_searchMedlemmerKeyReleased

private void opretMedlemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_opretMedlemActionPerformed
    String cpr = newMemberCprNr.getText();
    String fornavn = newMemberFirstName.getText();
    String efternavn = newMemberLastName.getText();
    String adresse = newMemberAdresse.getText();
    String telefon = newMemberPhoneNumber.getText();
    String email = newMemberEmail.getText();

    Main.mh.opretMedlem(cpr, fornavn, efternavn, adresse, telefon, email);

    //  Teksten bliver sat til null, i disee linjer herunder.
    newMemberCprNr.setText("");
    newMemberFirstName.setText("");
    newMemberLastName.setText("");
    newMemberAdresse.setText("");
    newMemberPhoneNumber.setText("");
    newMemberEmail.setText("");
    
    tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer.getText()),Main.mh.medlemsTitler()));
    
    JOptionPane.showMessageDialog(this, "Medlem oprettet");
}//GEN-LAST:event_opretMedlemActionPerformed

private void searchMedlemmerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchMedlemmerActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_searchMedlemmerActionPerformed

    private void fjernActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fjernActionPerformed
        Main.mh.fjernMedlem((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 0));
        tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer.getText()),Main.mh.medlemsTitler()));
    }//GEN-LAST:event_fjernActionPerformed

    private void redigerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_redigerActionPerformed
        newMemberCprNr.setText((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 0));
        newMemberFirstName.setText((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 1));
        newMemberLastName.setText((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 2));
        newMemberAdresse.setText((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 3));
        newMemberPhoneNumber.setText((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 4));
        newMemberEmail.setText((String)tableMedlemmer.getValueAt(tableMedlemmer.getSelectedRow(), 5));
        rediger.setEnabled(true);
        gem.setEnabled(true);
    }//GEN-LAST:event_redigerActionPerformed

    private void GemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GemActionPerformed
        Main.mh.redigerMedlem(newMemberCprNr.getText(), newMemberFirstName.getText(), newMemberLastName.getText(), newMemberAdresse.getText(), newMemberPhoneNumber.getText(), newMemberEmail.getText());
            tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer.getText()),Main.mh.medlemsTitler()));
            newMemberCprNr.setText("");
            newMemberFirstName.setText("");
            newMemberLastName.setText("");
            newMemberAdresse.setText("");
            newMemberPhoneNumber.setText("");
            newMemberEmail.setText("");
            gem.setEnabled(true);
    }//GEN-LAST:event_GemActionPerformed

    private void tilføjTræningsResultatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tilføjTræningsResultatActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tilføjTræningsResultatActionPerformed

    private void searchMedlemmer2KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchMedlemmer2KeyReleased
      tableMedlemmer.setModel(new javax.swing.table.DefaultTableModel(Main.mh.tabelMedlemmer(searchMedlemmer2.getText()),Main.mh.medlemsTitler()));
    }//GEN-LAST:event_searchMedlemmer2KeyReleased

	public void run() {
                new SpringB().setVisible(true);
            }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Gem;
    private javax.swing.JButton alleMedlemmer;
    private javax.swing.JButton betalteMedlemmer;
    private javax.swing.JButton exit;
    private javax.swing.JButton fjern;
    private javax.swing.JButton fjernFraHold;
    private javax.swing.JButton gem;
    private javax.swing.JButton ikkeBetalteMedlemmer;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTable3;
    private javax.swing.JTable jTable4;
    private javax.swing.JLabel medlemTotal;
    private javax.swing.JTextField newMemberAdresse;
    private javax.swing.JTextField newMemberCprNr;
    private javax.swing.JTextField newMemberEmail;
    private javax.swing.JTextField newMemberFirstName;
    private javax.swing.JTextField newMemberLastName;
    private javax.swing.JTextField newMemberPhoneNumber;
    private javax.swing.JButton opretMedlem;
    private javax.swing.JButton rediger;
    private javax.swing.JTextField searchMedlemmer;
    private javax.swing.JTextField searchMedlemmer2;
    private javax.swing.JTable tabelMedlemmer;
    private javax.swing.JTable tableMedlemmer;
    private javax.swing.JComboBox tilføjAldersgruppe;
    private javax.swing.JComboBox tilføjIdrætsgren;
    private javax.swing.JToggleButton tilføjTilHold;
    private javax.swing.JButton tilføjTræningsResultat;
    private javax.swing.JButton udtagKonkurrencehold;
    // End of variables declaration//GEN-END:variables
}
